home *** CD-ROM | disk | FTP | other *** search
-
- #: 13692 S4/Machine Code
- 13-Feb-88 20:53:08
- Sb: #untrapped error
- Fm: Rick Joslin 72167,3312
- To: Any LADS user
-
- To any of you who use Richard Mansfield's fine assembler, you
- probably thought you had made every possible error you could.
- I found one while trying to adapt the program to run on the
- B-128 that I had never encountered while using the program for
- years on my C64. In a nutshell:
-
- lda #bank (you meant to say lda bank, this is the error)
- sta somewhere
- etc., more code
- bank .byte 0
- (this is an address label, say $48A9 or something)
-
- Notice that 'bank' is a two byte address, and yet you are
- trying to load it into one byte (the accumulator). If lads
- stopped and told you this, all would be well, but it won't!
- What it does instead is load the low byte of the address into
- A, and then somehow gets its address counter off by one byte.
- The result is that all the code after lda #bank may look pretty
- good on the screen, but will be off by one byte, and your program
- will inevitably crash. If you start getting some 'impossible'
- crashes after adding some source code, you might look for an
- error like this.
-
- Hope this isn't old